
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>FreeMarker Index</title>

    <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/style.css"/>
  </head>

  <body>


    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>

 		<div class="navbar-brand" Left="400px">买家您好，${sys_user_key.account}</div>
	          <a class="navbar-brand" href="/system/logout">[退出]</a>
        </div>
       <div id="navbar" class="navbar-collapse collapse">
          	<form class="navbar-form navbar-right">
			<a class="navbar-brand" href="/buyer/index/all">首页</a>
			
            <a class="navbar-brand" href="/buyer/account">账务</a>
            
           	<a class="navbar-brand" href="/buyer/shoppingcart">购物车</a>
 			</form>
       </div><!--/.navbar-collapse -->
          
        
      </div>
    </nav>
  <#assign page_type="/buyer/index/all">
  <div class="g-doc">
    <div class="m-tab m-tab-fw m-tab-simple f-cb">
        <div class="tab">
       	<#if tab_type=="all">
            <ul>
                <li class="z-sel" ><a href="/buyer/index/all">所有商品</a></li>
                <li  ><a href="/buyer/index/no">未购买的商品</a></li>
            </ul>
         <#else>
         <ul>
                <li ><a href="/buyer/index/all">所有商品</a></li>
                <li class="z-sel" ><a href="/buyer/index/no">未购买的商品</a></li>
           </ul>
           <#assign page_type="/buyer/index/no">
         </#if>
        </div>
    </div>

    <div  class="n-plist">
      	<ul class="f-cb" id="plist">
	      	<#list page.list as commodity>
	       		<tr>
	       		<li id="${commodity.id}">
    			<a href="/buyer/detail?id=${commodity.id}" class="link">
	
	            <div class="icon">
	                <img src="${commodity.picture}" alt="${commodity.title}" />
	            </div>
	            <div class="data">
	                <p>${commodity.title}</p>
	                <p><span class="v-unit">¥</span><span class="v-value">${commodity.price}</span></p>
	            </div>
	            <#if commodity.status==1>
 				<span class="had"><b>已购买</b></span>
 				</#if>
			  	</a>
        		</li>
			</#list> 
    	</ul>
    </div> 
    
     <tr>
	   	 	  		<td colspan="6" class="text-center">
	   	 	  			  <ul class="pagination" style="margin:0px;">
	   	 	  			  	<!-- First Page -->
	   	 	  			  	<#if page.isFirstPage()>
	   	 	  			  		<li><span aria-hidden="true">&laquo;</span></li>
						    <#else>
								<li>
							      <a href="${page_type}?page=${page.pageNumber-1}" aria-label="Previous">
							        <span aria-hidden="true">&laquo;</span>
							      </a>
							    </li>
						    </#if>
						    
						    <#list page.navigatePageNumbers as index>
						    	<li><a href="${page_type}?page=${index}">${index}</a></li>
						    </#list>

							<!-- Last Page -->
							<#if page.isLastPage()>
	   	 	  			  		<li><span aria-hidden="true">&raquo;</span></li>
						    <#else>
								<li>
							      <a href="${page_type}?page=${page.pageNumber+1}" aria-label="Previous">
							        <span aria-hidden="true">&raquo;</span>
							      </a>
							    </li>
						    </#if>
						  </ul>
	   	 	  		</td>
	       	 	  </tr>
</div>

<div class="n-foot">
 <#include "/footer.ftl">
</div>
    <!-- Bootstrap core JavaScript -->
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  </body>
</html>